package gui;

import listener.MyActionListener;

public class SymWindow extends java.awt.event.WindowAdapter {

	private DayPopUp dpu;
	private MyActionListener action;
	

	public SymWindow(DayPopUp dpu_, MyActionListener action_) {

		this.dpu = dpu_;
		this.setAction(action_);

	}

	public void windowClosing(java.awt.event.WindowEvent event) {
		exitApplication();
	}

	public void exitApplication() {

		dpu.dispose();
		MyActionListener.setOffen(false);

	}

	public void setAction(MyActionListener action) {
		this.action = action;
	}

	public MyActionListener getAction() {
		return action;
	}
}
